﻿<shared:UserControlBase x:Class="HP.Cachalote.WPF.UserControls.SummaryMessageDisplayUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:shared="clr-namespace:HP.Cachalote.WPF.Shared"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             DataContext="{Binding SummaryMessageDisplay, Source={StaticResource Locator}}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Border BorderBrush="Red" BorderThickness="1" Padding="5" Visibility="{Binding ErrorMessageVisibility}">
            <StackPanel Orientation="Horizontal">
                <Image Source="/Resources/Images/Error.png" Height="24" Width="24" />
                <TextBlock Text="{Binding ErrorMessage}" ToolTip="{Binding ErrorMessage}" FontWeight="Bold" Foreground="Red" HorizontalAlignment="Center" Margin="3" />
            </StackPanel>
        </Border>

        <Border Grid.Row="1" BorderBrush="AliceBlue" BorderThickness="1" Padding="5" Visibility="{Binding SummaryMessageVisibility}">
            <StackPanel Orientation="Horizontal">
                <Image Source="/Resources/Images/Info.png" Height="24" Width="24" />
                <TextBlock Text="{Binding SummaryMessage}" ToolTip="{Binding SummaryMessage}" FontWeight="Bold" HorizontalAlignment="Center" Margin="3" />
            </StackPanel>
        </Border>
    </Grid>
</shared:UserControlBase>
